﻿@model SAIM.Models.ColumnData
<!-- Modal content-->
<div class="modal-content" style="overflow-x: auto;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title text-primary">@SAIM.Resources.Site.CreateColumn</h4>
    </div>
    <div class="modal-body table-responsive">
    @using (Html.BeginForm("_AddColumn", "EVirtual", FormMethod.Post, new { @class = "form-horizontal", role = "form", @id = "AddColumnForm" }))
    {
        @Html.AntiForgeryToken()
        @Html.HiddenFor(m => m.ListId)
        <div class="form-group">
            <label class="col-sm-3 control-label" for="email">@SAIM.Resources.Site.Name</label>
            <div class="col-sm-9">
                @Html.TextBoxFor(m => m.ColumnName, new { @class = "form-control", @maxlength = "32"})
                @Html.ValidationMessageFor(m => m.ColumnName, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label" for="email">@SAIM.Resources.Site.DataType</label>
            <div class="col-sm-9">
                @Html.HiddenFor(m => m.DataType)
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Text" checked>@SAIM.Resources.Site.Text</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Choice">@SAIM.Resources.Site.Choice</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Integer">@SAIM.Resources.Site.Integer</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Decimal">@SAIM.Resources.Site.Decimal</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Date">@SAIM.Resources.Site.Date</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Time">@SAIM.Resources.Site.Time</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="DateTime">@SAIM.Resources.Site.DateTime</label>
                </div>
                <div class="radio">
                    <label><input type="radio" name="Option" data-value="Hiperlink">@SAIM.Resources.Site.Hiperlink</label>
                </div>
            </div>
        </div>
        <div id="DataOptions"> </div>
        <div class="form-group">
            <div class="col-sm-offset-3 col-sm-9">
                <button id="AddColumnBtn" type="submit" class="btn btn-primary">@SAIM.Resources.Site.OK</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">@SAIM.Resources.Site.Cancel</button>
            </div>
        </div>
    }
    </div>
</div>

<script type="text/javascript">urlDataOptions = '@Url.Action("_GetDataOptions", "EVirtual")';</script>
<script type="text/javascript" src="@Url.Content("~/Scripts/EVirtual/AddColumn.js")"></script>